package com.edunera.models;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;



public class edu_tags {
	public int tag_id;
	public String tag;
	public Date creation_date;
	
	public static ArrayList<edu_tags> getTagListByJson(JSONArray tagsInJson){
		
		ArrayList<edu_tags> edu_tagsList=new ArrayList<edu_tags>();
		
		for(int i=0;i<tagsInJson.length();i++){
			edu_tags et=new edu_tags();
			try{
				JSONObject jo=tagsInJson.getJSONObject(i);
				et.tag=jo.getString("tag");
				et.tag_id=jo.getInt("tag_id");
				
			}catch(JSONException ex){
				
			}
			
		}	
		return edu_tagsList;
	}
}
